<template>
  <div>
    <el-tabs type="border-card">
      <el-tab-pane label="用户管理" v-for="(item, index) in tabMenu" :key="index">
        <avue-crud :option="option"
                   :table-loading="loading"
                   :data="tableData"
                   :page.sync="page"
                   ref="crud"
                   @on-load="onLoad"
        >
        </avue-crud>
      </el-tab-pane>
    </el-tabs>
    <div class="bottom">
      <div>
        <span>导入状态：导入中。。。</span>
      </div>
      <div>
        <el-button @click="handleBeginImport">开始导入</el-button>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'importData',
  data () {
    return {
      tabMenu: [{
        label: '文书案卷',
        value: '文书案卷'
      }, {
        label: '文书卷内',
        value: '文书卷内'
      }, {
        label: '文书简化',
        value: '文书简化'
      }],
      loading: true,
      page: {
        pageSize: 20,
        currentPage: 1,
        pageSizes: [20, 40, 60, 80],
        total: 0
      },
      tableData: []
    }
  },
  computed: {
    option () {
      return {
        align: 'center',
        menuAlign: 'center',
        header: false,
        border: true,
        size: 'medium',
        height: 'calc(100vh - 300px)',
        index: true, // 显示序号
        indexLabel: '序号', // 显示序号
        selection: false, // 多选
        editBtn: false, // 行内编辑按钮
        delBtn: false, // 行内删除按钮
        viewBtn: false, // 行内查看按钮
        menuWidth: 200,
        menu: false,
        column: [
          {
            label: '档号',
            prop: 'fondsNo',
            overHidden: true
          },
          {
            label: '题名',
            prop: 'fondsNo1',
            overHidden: true
          },
          {
            label: '责任者',
            prop: 'fondsNo1',
            overHidden: true
          },
          {
            label: '文件开始时间',
            prop: 'fondsNo1',
            overHidden: true
          },
          {
            label: '文件结束时间',
            prop: 'fondsNo1',
            overHidden: true
          },
          {
            label: '备注',
            prop: 'fondsNo1',
            overHidden: true
          }
        ]
      }
    }
  },
  methods: {
    handleBeginImport () {

    },
    onLoad () {
      // 加载列表
      this.loading = true
      /* const query = {
            pageSize: this.page.pageSize,
            pageNo: this.page.currentPage
          }
          getQzDic(query).then(res => {
            this.tableData = res.data.data.list
            this.loading = false
          }) */
      setTimeout(() => {
        this.loading = false
      }, 1000)
    },
    handleDataTesting () {
      console.log('检测数据')
    }
  }
}
</script>

<style lang="scss" scoped>
  @import "../../../../styles/mixin";

  .bottom {
    @include fj;
    padding-top: 15px;
    p{
      a{
        color: #40a9ff;
        text-decoration: underline;
      }
    }
  }
</style>
